<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <%@include file="/WEB-INF/pages/header.jsp"%>
    <style>
        #table_enterResult tr td{
            border:1px solid #000;
            height: 35px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-body">
            <form class="form-inline" action="${ctx}/director/enterResult/searchCase" id="condition" >
                <div class="col-md-8">
                    <div class="col-md-6" style="line-height: 40px;">
                        <div class="form-group">
                            <label class="control-label">病历号:</label>
                            <input type="text" class="form-control" name="caseNo" value="${param.caseNo}">
                        </div>
                        <div class="form-group">
                            <label class="control-label">手机号:</label>
                            <input type="text" class="form-control" name="memberMobile" value="${param.memberMobile}">
                        </div>
                    </div>

                    <div class="col-md-6" style="line-height: 40px;">
                        <div class="form-group">
                            <label class="control-label">身份证号:</label>
                            <input type="text" class="form-control" name="memberNo" value="${param.memberNo}">
                        </div>
                        <div class="form-group">
                            <label class="control-label">就诊日期:</label>
                            <input type="date" class="form-control" name="treatmentDate" value="${param.treatementDate}">
                        </div>
                    </div>

                </div>
                <div class="col-md-4">
                    <button style="margin-top:20px;" type="submit" class="btn btn-primary" >查询</button>
                    <c:if test="${ca.caseNo!=null && ca.caseNo!=''}" var="caseNoFlag">
                        <button style="margin-top:20px;" type="button" onclick="reservation(${ca.caseNo},${ca.memberId},${ca.caseId})" class="btn btn-success">预约治疗仪</button>
                    </c:if>
                    <c:if test="${!caseNoFlag}">
                        <button style="margin-top:20px;" type="button" onclick="reservation(1,1)" class="btn btn-success">预约治疗仪</button>
                    </c:if>
                    <c:if test="${ca.caseNo!=null && ca.caseNo!=''}" var="caseNoFlag2">
                        <button style="margin-top:20px;" type="button" onclick="xInfo(${ca.caseId})" class="btn btn-warning">开具X光检查</button>
                    </c:if>
                    <c:if test="${!caseNoFlag2}">
                         <button style="margin-top:20px;" type="button" onclick="xInfo(1)" class="btn btn-warning">开具X光检查</button>
                    </c:if>
                </div>
            </form>
        </div>
    </div>
    <h4 class="text-center" style="font-size:28px;">医院病历单</h4>
        <table id="table_enterResult" style="margin:0 auto;border:1px solid #ccc;width:900px;">
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">病例号:</td>
                <td style="width:300px;"><span>${ca.caseNo}</span></td>
                <td style="width:100px;text-align:right;background: #ccc;">患者姓名:</td>
                <td style="width:300px;"><span>${ca.member.memberName}</span></td>
            </tr>
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">性别:</td>
                <c:set var="sex" value="${ca.member.memberSex}"/>
                <td style="width:300px;"><span>${sex==0?'女':sex==1?'男':''}</span></td>
                <td style="width:100px;text-align:right;background: #ccc;">就诊时间:</td>
                <td style="width:300px;"><span>${ca.treatment.treatmentDate}</span></td>
            </tr>
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">就诊项目:</td>
                <td colspan="3" id="jiuzhen">
                    <c:if test="${ca.illnesses!=null}">
                        <c:forEach var="i" step="1" begin="0" end="${ca.illnesses.size()-1}">
                        <div style="margin:10px 0;" class="form-group">
                            ${i+1}、${ca.illnesses[i].illnessName}
                        </div>
                        </c:forEach>
                    </c:if>
                </td>
            </tr>
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">检查:</td>
                <td colspan="3">
                    <div style="margin:25px 0 0 15px;">
                        <div style="float:left;">查体:</div>
                        <div style="float:left;margin-left:15px;border:1px solid #bbb;width:600px;">
                            <form id="checkForm" action="${ctx}/director/xInfo/viewXInfo" method="post">
                                <input type="hidden" name="caseId" value="${ca.caseId}"/>
                                <div style="margin:10px 0;" class="form-group" id="chakan">
                                    <div>
                                        <label  class="">1、</label>
                                        <input  style="margin-left:15px;" onfocus="showValue3(this)" type="text"/>
                                    </div>

                                </div>
                            </form>
                        </div>
                    </div>
                    <div style="margin:60px 0 0px 15px;">
                        <div style="float:left;clear:both;">影像:</div>
                        <div style="float:left;margin-left:15px;width:600px;margin-bottom:25px;margin-top:15px;">
                            <table style="width:600px;">
                                <tr>
                                    <td style="background:#11aaaa;width:150px;text-align:center;">影像资料:</td>

                                    <td colspan="2">
                                        <a href="javascript:viewXInfo();">查看</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="background:#11aaaa;width:150px;text-align:center;">检查所见:</td>
                                    <td id="checkSee" colspan="2">

                                    </td>
                                </tr>
                                <tr>
                                    <td style="background:#11aaaa;width:150px;text-align:center;">检查诊断:</td>
                                    <td id="xDiagnose" colspan="2">
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">诊断:</td>
                <td colspan="3" id="zhenduan">
                    <c:if test="${ca.illnesses!=null}">
                        <c:forEach var="i" step="1" begin="0" end="${ca.illnesses.size()-1}">
                            <div style="margin:10px 0;" class="form-group">
                                    ${i+1}、${ca.illnesses[i].illnessResult}
                            </div>
                        </c:forEach>
                    </c:if>
                </td>
            </tr>
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">是否需要复查:</td>
                <td colspan="3">
                    <c:if test="${ca.caseReview!=null || ca.caseReview!=null}">
                        <c:if test="${ca.caseReview==1}" var="isFlag">
                        <span>是,建议复查日期:${ca.caseReviewDate}</span>
                        </c:if>
                        <c:if test="${!isFlag}">
                            <span>否</span>
                        </c:if>
                    </c:if>
                </td>
            </tr>
            <tr>
                <td style="width:100px;text-align:right;background: #ccc;">建议:</td>
                <td colspan="3">
                    <span>${ca.caseSug}</span>
                </td>
            </tr>
        </table>
    <div style="width:100%;margin:0 auto;">
    </div>
</div>



<%@include file="/WEB-INF/pages/footer.jsp"%>
<script src="${ctx}/res/js/enterResult.js"></script>
</body>
</html>
